﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TrademarkModify.aspx.cs" Inherits="GreatB2C.Web.Manage.SystemSet.Shop.TrademarkModify" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>修改品牌信息</title>
    <link href="../../../App_Themes/AdminDefaultTheme/Guide.css" type="text/css" rel="stylesheet" />
    <link href="../../../App_Themes/AdminDefaultTheme/index.css" type="text/css" rel="stylesheet" />
    <link href="../../../App_Themes/AdminDefaultTheme/xtree.css" type="text/css" rel="stylesheet" />
    <link href="../../../App_Themes/AdminDefaultTheme/MasterPage.css" type="text/css"
        rel="stylesheet" />

    <script type="text/javascript" src="../../../Resource/Script/pagebase.js"></script>
    
	<link rel="stylesheet" type="text/css" href="../../../Resource/jqueryEasyui/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="../../../Resource/jqueryEasyui/themes/icon.css" />
	<script type="text/javascript" src="../../../Resource/jqueryEasyui/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="../../../Resource/jqueryEasyui/jquery.easyui.min.js"></script>

    <script src="../../../Resource/Script/jquery.validate.min.js" type="text/javascript"></script>
    
    <script type="text/javascript" src="../../../Component/tiny_mce/tiny_mce.js"></script>

    <script type="text/javascript">
        window.onload = function(){
            // validate signup form on keyup and submit
            $("#form1").validate({
                rules: {
                    txtTrademarkName: {
                        required: true
                    }
                },
                messages: {
                    txtTrademarkName: {
                        required: "<font class='validatemsg'>* 请输入品牌名称</font>"
                    }
                }
            });

            tinyMCE.init({
                // General options
                mode: "exact",
                theme: "advanced",
                skin: "default",
                elements: "txtTrademarkIntro",
                plugins: "autolink,lists,pagebreak,style,layer,table,,advimage,advlink,insertdatetime,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable",

                // Theme options
                theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,formatselect,fontselect,fontsizeselect,|,bullist,numlist,|,forecolor,backcolor,|,fullscreen,code",
                theme_advanced_buttons2: "",
                theme_advanced_buttons3: "",
                theme_advanced_buttons4: "",
                theme_advanced_toolbar_location: "top",
                theme_advanced_toolbar_align: "left",
                theme_advanced_statusbar_location: "bottom",

                theme_advanced_resizing: false,

                // Example word content CSS (should be your site CSS) this one removes paragraph margins
                content_css: "css/word.css",

                language: "zh",

                // Replace values for the template plugin
                template_replace_values: {
                    username: "betterlife",
                    staffid: "123456"
                }
            });

            document.getElementById('imgTrademarkPhoto').attachEvent("onerror", oe);
        }

        var thispath = "<%=uploadpath %>";
        
        function UploadImage(objid) {
            var top = (document.documentElement.clientHeight - 400) / 2;
            var left = (document.documentElement.clientWidth - 500) / 2;
            $("#fraUpload").attr("src", "../../../Controls/Upload/FileUpload.aspx?path=" + encodeURIComponent(thispath));
            $('#win').window({
                title: '品牌图片上传',
                width: 500,
                height: 460,
                modal: true,
                shadow: true,
                closed: false,
                resizable: false,
                minimizable:false,
                maximizable: false,
                top: top,
                left: left
            });
        }

        function getChoose() {
            var choose = $("#fraUpload")[0].contentWindow.getChoose();
            if (choose != "") {
                if (choose.indexOf(",") > 0) {
                    choose = choose.substring(0, choose.indexOf(','));
                }

                document.getElementById("hidImagSrc").value = thispath + choose;
                document.getElementById("imgTrademarkPhoto").src = thispath + choose;

                $('#win').window('close');
            }
            else {
                alert("请选择品牌图片！");
            }
        }

        function oe() {
            isimg = false;
            alert("您选择的文件不是图片格式，请重新选择！");
            document.getElementById('imgTrademarkPhoto').src = '../../../Resource/Images/default.gif';
        }

        

    </script>

</head>
<body>
    <form id="form1" runat="server">
    <input id="hidImagSrc" type="hidden" value="" runat="server" />
    <table width="100%" border="0" cellpadding="2" cellspacing="1" class="border">
        <tr align="center">
            <td colspan="2" class="spacingtitle">
                <b>修改品牌信息</b>
            </td>
        </tr>
        <tr class="tdbg">
            <td style="width: 15%; white-space: nowrap;" class="tdbgleft" align="right">
                品牌名称：
            </td>
            <td>
                <asp:TextBox ID="txtTrademarkName" runat="server" MaxLength="100" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft" align="right">
                所属厂商：
            </td>
            <td>
                <asp:DropDownList ID="ddlProducerID" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft" align="right">
                是否推荐：
            </td>
            <td>
                <asp:CheckBox ID="chbIsElite" runat="server" />
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft" align="right">
                品牌分类：
            </td>
            <td>
                <asp:RadioButtonList ID="radlTrademarkType" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal" />
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft" align="right">
                品牌照片：
            </td>
            <td>
                <asp:Image ID="imgTrademarkPhoto" Width="150px" Height="172px" ImageAlign="AbsMiddle"
                    runat="server" ImageUrl="../../../Resource/Images/default.gif" /><br />
                <a href="javascript:void(0);" onclick="UploadImage( 'imgTrademarkPhoto' );">上传文件</a>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft" align="right">
                品牌简介：
            </td>
            <td>
                <asp:TextBox ID="txtTrademarkIntro" runat="server" TextMode="MultiLine" Rows="20"
                    Columns="50" CssClass="inputtext" style="width:400px; height:350px;" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
            </td>
        </tr>
        <tr class="tdbgbottom">
            <td colspan="2">
                <asp:Button ID="BtnSubmit" runat="server" Text="修 改[S]" class="btnstyle_blue" Style="width: 70px;"
                    AccessKey="S" onmouseover="this.className='btnstyle_blue_over'" onmouseout="this.className='btnstyle_blue'"
                    OnClick="BtnSubmit_Click" />&nbsp;&nbsp;
                <input type="reset" name="ClearSiteInfo" value="重 填[R]" class="btnstyle_blue" id="btnSiteInfoReset"
                    accesskey="R" style="width: 70px;" runat="server" onmouseover="this.className='btnstyle_blue_over'"
                    onmouseout="this.className='btnstyle_blue'" />
            </td>
        </tr>
    </table>
    
    <div id="win" class="easyui-window" closed="true" modal="true" title="PopWindow">
        <div>
            <iframe id="fraUpload" src="" frameborder="0" width="100%" height="390px" scrolling="no"></iframe>
        </div>
		<div region="south" border="false" style="text-align:center;height:30px;line-height:30px;">
			<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="getChoose()">确定</a>
			<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)">关闭</a>
		</div>
    </div>
    </form>
    <asp:Literal ID="litScript" runat="server"></asp:Literal>
</body>
</html>
